package com.epoint.springsecuritylearning.rest;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloWordRest {

    /**
     * 首次访问需要登录
     */
    @RequestMapping("/helloworld")
//    @PreAuthorize("hasAuthority('system:inspection:list')")
    public String helloworld(){
        return "你好，世界";
    }

    /**
     * 首次访问需要登录
     */
    @RequestMapping("/helloworld2")
//    @PreAuthorize("@ex.hasAuthority('system:inspection:list')")
    public String helloworld2222(){
        return "你好，世界2222";
    }
}
